/*
 * 文件名：OAHandleEntity.java
 * 版权：Copyright by www.tiansu-china.com/
 * 描述：
 * 修改人：congriran
 * 修改时间：2020年11月26日
 * 跟踪单号：
 * 修改单号：
 * 修改内容：
*/

package com.tiansu.reborn.wanda.modules.executor.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("TB_PAYMENT_OA_APPROVE")
public class OAHandleEntity implements Serializable
{
    private static final long serialVersionUID = -4061473760633068183L;
    
    @TableId
    private String businessId;
    private Integer plazaId;
    private Long brandId;
    private String brandName;
    private Integer deviceId;
    private Integer operateType;

    @TableField(exist = false)
    private String operateName;

    private Integer oldStatus;
    private Integer newStatus;
    private BigDecimal rechargeMoney;
    private Integer approveType;

    @TableField(exist = false)
    private String approveName;

    private String operatorName;
    private String approverName;
    private Timestamp launchUpdateTime;

    @TableField(exist = false)
    private String launchUpdateTimeStr;

    private Timestamp createTime;

    @TableField(exist = false)
    private String createTimeStr;

    private String rechargeMoneyReason;
    private Integer tryTimes;
    private String approveDesc;
    private Integer urgentOrder;

    public void setStrField(OAHandleEntity entity)
    {
        this.setApproveName();
        this.setOperateName();
        this.setLaunchUpdateTimeStr();
        this.setCreateTimeStr();
    }

    public String getBusinessId()
    {
        return businessId;
    }

    public void setBusinessId(String businessId)
    {
        this.businessId = businessId;
    }

    public Integer getPlazaId()
    {
        return plazaId;
    }

    public void setPlazaId(Integer plazaId)
    {
        this.plazaId = plazaId;
    }

    public Long getBrandId()
    {
        return brandId;
    }

    public void setBrandId(Long brandId)
    {
        this.brandId = brandId;
    }

    public String getBrandName()
    {
        return brandName == null ? "" : brandName;
    }

    public void setBrandName(String brandName)
    {
        this.brandName = brandName;
    }

    public Integer getDeviceId()
    {
        return deviceId;
    }

    public void setDeviceId(Integer deviceId)
    {
        this.deviceId = deviceId;
    }

    public Integer getOperateType()
    {
        return operateType;
    }

    public void setOperateType(Integer operateType)
    {
        this.operateType = operateType;
    }

    public String getOperateName()
    {
        return operateName;
    }

    public void setOperateName(String operateName)
    {
        this.operateName = operateName;
    }

    private void setOperateName()
    {
        if (3 == this.operateType)
        {
            this.operateName = "商户编辑";
        }
        else if (4 == this.operateType)
        {
            this.operateName = "减免补偿充值";
        }
        else if (5 == this.operateType)
        {
            this.operateName = "修改费率模板";
        }
        else if (6 == this.operateType)
        {
            this.operateName = "新增费率模板";
        }
        else if (7 == this.operateType)
        {
            this.operateName = "减表";
        }
        else if (8 == this.operateType)
        {
            this.operateName = "撤销";
        }
        else if (9 == this.operateType)
        {
            this.operateName = "撤场";
        }
        else if (10 == this.operateType)
        {
            this.operateName = "电价改革";
        }
        else
        {
            this.operateName = "";
        }
    }

    public Integer getOldStatus()
    {
        return oldStatus;
    }

    public void setOldStatus(Integer oldStatus)
    {
        this.oldStatus = oldStatus;
    }

    public Integer getNewStatus()
    {
        return newStatus;
    }

    public void setNewStatus(Integer newStatus)
    {
        this.newStatus = newStatus;
    }

    public BigDecimal getRechargeMoney()
    {
        return rechargeMoney;
    }

    public void setRechargeMoney(BigDecimal rechargeMoney)
    {
        this.rechargeMoney = rechargeMoney;
    }

    public Integer getApproveType()
    {
        return approveType;
    }

    public void setApproveType(Integer approveType)
    {
        this.approveType = approveType;
    }

    public String getApproveName()
    {
        return approveName;
    }

    public void setApproveName(String approveName)
    {
        this.approveName = approveName;
    }

    private void setApproveName()
    {
        if (0 == this.approveType)
        {
            this.approveName = "已保存";
        }
        else if (1 == this.approveType)
        {
            this.approveName = "审批中";
        }
        else if (6 == this.approveType)
        {
            this.approveName = "已退回";
        }
        else if (9 == this.approveType)
        {
            this.approveName = "已作废";
        }
        else if (12 == this.approveType)
        {
            this.approveName = "待处理";
        }
        else if (20 == this.approveType)
        {
            this.approveName = "处理中";
        }
        else if (21 == this.approveType)
        {
            this.approveName = "已完成";
        }
        else
        {
            this.approveName = "";
        }
    }

    public String getOperatorName()
    {
        return operatorName == null ? "" : operatorName;
    }

    public void setOperatorName(String operatorName)
    {
        this.operatorName = operatorName;
    }

    public String getApproverName()
    {
        return approverName == null ? "" : approverName;
    }

    public void setApproverName(String approverName)
    {
        this.approverName = approverName;
    }

    public Timestamp getLaunchUpdateTime()
    {
        return launchUpdateTime;
    }

    public void setLaunchUpdateTime(Timestamp launchUpdateTime)
    {
        this.launchUpdateTime = launchUpdateTime;
    }

    public String getLaunchUpdateTimeStr()
    {
        return launchUpdateTimeStr;
    }

    public void setLaunchUpdateTimeStr(String launchUpdateTimeStr)
    {
        this.launchUpdateTimeStr = launchUpdateTimeStr;
    }

    private void setLaunchUpdateTimeStr()
    {
        this.launchUpdateTimeStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.launchUpdateTime);
    }

    public Timestamp getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime)
    {
        this.createTime = createTime;
    }

    public String getCreateTimeStr()
    {
        return createTimeStr;
    }

    public void setCreateTimeStr(String createTimeStr)
    {
        this.createTimeStr = createTimeStr;
    }

    private void setCreateTimeStr()
    {
        this.createTimeStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }

    public String getRechargeMoneyReason()
    {
        return rechargeMoneyReason == null ? "" : rechargeMoneyReason;
    }

    public void setRechargeMoneyReason(String rechargeMoneyReason)
    {
        this.rechargeMoneyReason = rechargeMoneyReason;
    }

    public Integer getTryTimes()
    {
        return tryTimes;
    }

    public void setTryTimes(Integer tryTimes)
    {
        this.tryTimes = tryTimes;
    }

    public String getApproveDesc()
    {
        return approveDesc == null ? "" : approveDesc;
    }

    public void setApproveDesc(String approveDesc)
    {
        this.approveDesc = approveDesc;
    }

    public Integer getUrgentOrder()
    {
        return urgentOrder;
    }

    public void setUrgentOrder(Integer urgentOrder)
    {
        this.urgentOrder = urgentOrder;
    }

    @Override
    public String toString()
    {
        return "OAHandleEntity [businessId=" + businessId + ", plazaId=" + plazaId + ", brandId=" + brandId
                + ", brandName=" + brandName + ", deviceId=" + deviceId + ", operateType=" + operateType
                + ", operateName=" + operateName + ", oldStatus=" + oldStatus + ", newStatus=" + newStatus
                + ", rechargeMoney=" + rechargeMoney + ", approveType=" + approveType + ", ApproveName=" + approveName
                + ", operatorName=" + operatorName + ", approverName=" + approverName + ", launchUpdateTime="
                + launchUpdateTime + ", createTime=" + createTime + ", rechargeMoneyReason=" + rechargeMoneyReason
                + ", tryTimes=" + tryTimes + ", approveDesc=" + approveDesc + ", urgentOrder=" + urgentOrder + "]";
    }

}
